/* --------------------------------------------------------
 * Copyright (c) aeky , Inc.  All rights reserved.
 * --------------------------------------------------------
 */
package com.aeky.strategy.enhance;

import com.aeky.strategy.enhance.duck.Duck;
import com.aeky.strategy.enhance.duck.DuckA;
import com.aeky.strategy.enhance.flyBehavior.FlyBehavior;
import com.aeky.strategy.enhance.flyBehavior.FlyWithWings;
import com.aeky.strategy.enhance.quackBehavior.QuackBehavior;
import com.aeky.strategy.enhance.quackBehavior.QuackMute;

/**
 * 测试鸭子类
 * 
 * @author aeky
 */
public class Test {

    /**
     * @param args
     */
    public static void main(String[] args) {
        Duck duckA = new DuckA();
        duckA.performFly();
        duckA.performQuack();
        System.out.println("------------");
        FlyBehavior f = new FlyWithWings();
        QuackBehavior q = new QuackMute();
        duckA.setFlyBehavior(f);
        duckA.setQuackBehavior(q);
        duckA.performFly();
        duckA.performQuack();
    }

}
